<div id="page-wrapper">

    <div class="container-fluid">

        <!-- Page Heading -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">
                    Penugasan Followup
                </h1>
                <ol class="breadcrumb">
                    <li>
                        <i class="fa fa-dashboard"></i>  <a href="<?php echo base_url(); ?>home">Dashboard</a>
                    </li>
                    <li class="active">
                        <i class="fa fa-edit"></i> Penugasan Followup
                    </li>
                </ol>
            </div>
        </div>
        <!-- /.row -->
    	<div class="col-lg-12">
            <h2>Penugasan</h2>
            <form method="post" action="<?php echo base_url(); ?>modul/penugasan_followup/search_index">
                    <input type="text" class="input-teks" size="70" value="<?php if($this->input->post('cari')) echo $this->input->post('cari'); else echo 'Cari Perusahaan...'; ?>" onblur="if(this.value=='') this.value='<?php echo 'Cari Perusahaan...'; ?>';" onfocus="if(this.value=='<?php echo 'Cari Perusahaan...'; ?>') this.value='';" name="cari"  />
                    <input type="submit" value="Search" class="input-tombol" style="margin:0;padding: 9px 30px;" />
            </form>
            <a href="<?php echo base_url()?>modul/penugasan_followup/show" class="btn"><i class="icol-magnifier"></i> Hasil Kerja</a>
            <?php echo form_open_multipart('modul/penugasan_followup/create') ?>
                <table class="table table-hover table-striped">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>Perusahaan</th>
                            <th>Hasil Marketing</th>
                            <th>Catatan</th>
                            <th>Marketer</th>
                            <th>Pilih Teknisi</th>
                        </tr>
                    </thead>
                    <tbody>
                            <?php $i = 1 ?>
                            <?php foreach($rows_penugasan_marketing as $row_pm): ?>
                                    <tr>
                                        <?php echo form_hidden('id_penugasan_marketing['.$i.']', $row_pm->id_penugasan_marketing);?>
                                        <td><?php echo $i ?></td>
                                        <td><?php echo $row_pm->nama_perusahaan ?></td>
                                        <td><?php echo $row_pm->deskripsi_hasil_marketing ?></td>
                                        <td><textarea class="form-control" rows="3" name="<?php echo 'keterangan_penugasan_followup['.$i.']'?>"></textarea></td>
                                        <td><?php echo $row_pm->nama_marketer ?></td>                   
                                        <td>
                                            <select id="bidang" class="form-control">
                                                <option value=""><font color="gray">-Bidang Keahlian-</font></option>
                                                <?php foreach($rows_teknisi as $row_t): ?>
                                                <option value="<?php echo $row_t->bidang_teknisi ?>"><?php echo $row_t->bidang_teknisi ?></option>
                                                <?php endforeach ?>                                    
                                            </select><br>
                                            <select id="teknisi" class="form-control" name="<?php echo 'teknisi['.$i.']'?>">
                                                <option value="">--</option>
                                                <?php foreach($rows_teknisi as $row_t): ?>
                                                <option value="<?php echo $row_t->id_teknisi ?>" class="<?php echo $row_t->bidang_teknisi ?>"><?php echo $row_t->nama_teknisi ?></option>
                                                <?php endforeach ?>                                    
                                            </select>
                                        </td>
                                    </tr>
                                <?php $i++; ?>
                            <?php endforeach ?>
                    </tbody>
                </table>
                <div class="form-group">
                    <button type="submit" class="btn btn-default">Save</button>
                </div>
            <?php echo form_close()?>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /.container-fluid -->

<script>
/*$("#teknisi").chained("#bidang"); */ $("#teknisi").chainedTo("#bidang"); 
</script>